home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1992-06-30 | 42.5 KB | 1,234 lines
C.S.M.P. Digest Tue, 26 May 92 Volume 1 : Issue 94 Today's Topics: Serial Line from Sun To Mac The death of TEInsert when memory lacks Apple Installer and Compression Mac IIfx advice wanted Is it possible to dim a list box item Power Book Slow Mode "Low Memory" Situatiojn Creating interface -- help!!! mpw 3.2 c++/cfront 2.0 question Think Reference Question (Experiences?) Something to smirk about Determining the size of a file - SFGetfile The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly. These digests are available (by using FTP, account anonymous, your email address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon. edu. This is also the home of the comp.sys.mac.programmer Frequently Asked Questions list. The last several issues of the digest are available from sumex-aim.stanford.edu as well. These digests are also available via email. Just send a note saying that you want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will automatically receive each new digest as it is created. The digest is a collection of articles from the internet newsgroup comp.sys. mac.programmer. It is designed for people who read c.s.m.p. semi-regularly and want an archive of the discussions. If you don't know what a newsgroup is, you probably don't have access to it. Ask your systems administrator(s) for details. (This means you can't post questions to the digest.) The articles in these digests are taken directly from comp.sys.mac.programmer. They are not edited; all articles included in this digest are in their original posted form. The only articles that are -not- included in these digests are those which didn't receive any replies (except those that give information rather than ask a question). All replies to each article are concatenated onto the original article in the order in which they were received. Article threads are not added to the digests until the last article added to the thread is at least one month old (this is to ensure that the thread is dead before adding it to the digests). Send administrative mail to mkelly@cs.uoregon.edu. ------------------------------------------------------- From: vincent@osc.osc.com (Vincent Tong) Subject: Serial Line from Sun To Mac Date: 14 Apr 92 23:51:24 GMT Organization: Versant Object Technology, Menlo Park, CA Hi, I'm trying to transfer some data across a serial line from a Sun to Mac. Anyone knows if there are any problems with this? If not, is there any sample code out there that I could look at? Thanks in advance Vincent +++++++++++++++++++++++++++ From: Jeremiah.Blatz@dartmouth.edu (Jeremiah Blatz) Date: 25 Apr 92 18:35:39 GMT Organization: Dartmouth College, Hanover, NH In article <5486@osc.COM> vincent@osc.osc.com (Vincent Tong) writes: > I'm trying to transfer some data across a serial line > from a Sun to Mac. Anyone knows if there are any problems > with this? The easiest wat I know to do this is to use a communications program. There was an article on this in the last MacUser. Hope this helps, Jeremiah --------------------------- From: braun-eric@CS.YALE.EDU (Eric E. Braun) Subject: The death of TEInsert when memory lacks Organization: Yale University Computer Science Dept., New Haven, CT 06520-2158 Date: Sat, 25 Apr 1992 12:49:34 GMT Has anybody had trouble getting TEInsert to work in low memory situations? At times I am seeing garbage characters drawn on the screen and the insert fails. This is allways correlated with low memory but its not any obvious how low. I would expect it to be when its less than the ammount of the insert or less than twice the ammount of the insert incase it needs to make a copy, but it's niether! Hints clues? Thanks - -- - ------------------------------------------------------------------------------- Eric E. Braun braun@zoo.cs.yale.edu +++++++++++++++++++++++++++ From: nagle@netcom.com (John Nagle) Date: Sat, 25 Apr 92 18:38:20 GMT Organization: Netcom - Online Communication Services (408 241-9760 guest) braun-eric@CS.YALE.EDU (Eric E. Braun) writes: >Has anybody had trouble getting TEInsert to work in low memory >situations? At times I am seeing garbage characters drawn on the >screen and the insert fails. This is allways correlated with low memory >but its not any obvious how low. I would expect it to be when its >less than the ammount of the insert or less than twice the ammount of >the insert incase it needs to make a copy, but it's niether! TEInsert also fails if it pushes the size of the edit object over 32767 bytes. The action taken on overflow is to trash memory. This last is not documented in IM. John Nagle --------------------------- From: neal@farallon.com (Neal Trautman) Subject: Apple Installer and Compression Date: 14 Apr 92 13:25:34 GMT Organization: Farallon Computing, Inc. I need to compress some files to fit on a single diskette. I also need to use Apple's Installer to do auto-decompression and installation. The only product I have heard of is VISE. I don't think any of the other standard compression utilities, StuffIt, Compact Pro, etc. offer decompression in Apple's Installer. Are there any others? Any recommendations? - -- Neal Trautman Timbuktu Lead Software Engineer Farallon Computing, Inc. neal@farallon.com +++++++++++++++++++++++++++ From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) Date: 15 Apr 92 17:16:30 +1200 Organization: University of Waikato, Hamilton, New Zealand In article <258@farallonfarallon.com>, neal@farallon.com (Neal Trautman) writes: > I don't think any of the other standard > compression utilities, StuffIt, Compact Pro, etc. > offer decompression in Apple's Installer. I think they do. I recall installing something that used Apple's Installer and StuffIt compression, but I can't remember which application it was. It wasn't Canvas... :-} Lawrence D'Oliveiro fone: +64-7-856-2889 Computer Services Dept fax: +64-7-838-4066 University of Waikato electric mail: ldo@waikato.ac.nz Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00 +++++++++++++++++++++++++++ From: jtgorman@cs.arizona.edu (J. Taggart Gorman) Date: 15 Apr 92 08:51:51 GMT Organization: None - Entire program eliminated due to budget cuts :) In article <1992Apr15.171630.7439@waikato.ac.nz>, Citizen ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes : >In article <258@farallonfarallon.com>, neal@farallon.com (Neal Trautman) writes: >> I don't think any of the other standard >> compression utilities, StuffIt, Compact Pro, etc. >> offer decompression in Apple's Installer. > >I think they do. I recall installing something that used Apple's Installer >and StuffIt compression, but I can't remember which application it was. > >It wasn't Canvas... :-} Just installed Word 5.0 (no flames, please) today. It uses Apple's installer to place Word on your hard drive. Thing is, it first copies _Stuffit Classic_ files to the hard drive, then uses "Stuffit Engine v1.3" (I think v1.3) to unstuff. |--------------------------------| "I like it. It's got that 'It's a cruel | J. Taggart Gorman Jr. | world - Let's throw ourselves in the | jtgorman@caslon.cs.arizona.edu | abyss.' type ambience." |--------------------------------| - Christian Slater, in _Heathers_ +++++++++++++++++++++++++++ From: drc@claris.com (Dennis Cohen) Date: 15 Apr 92 13:57:25 GMT Organization: Claris Corporation, Santa Clara CA ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes: >In article <258@farallonfarallon.com>, neal@farallon.com (Neal Trautman) writes: >> I don't think any of the other standard >> compression utilities, StuffIt, Compact Pro, etc. >> offer decompression in Apple's Installer. >I think they do. I recall installing something that used Apple's Installer >and StuffIt compression, but I can't remember which application it was. >It wasn't Canvas... :-} You will have seen it in a number of products, including Claris Resolve and Microsoft Word 5. Aladdin licenses the decompression/join atoms to developers and we code our installer scripts to run the atoms at the end of the install process (because you can only invoke action atoms at the start and end of, but not during, an installation). Vise Technologies also provides compression/ decompression for use with the Apple Installer -- Symantec's GreatWorks is one customer of this technology. - -- Dennis Cohen Claris Corp. **************************************************** Disclaimer: Any opinions expressed above are _MINE_! +++++++++++++++++++++++++++ From: time@ice.com (Tim Endres) Date: 15 Apr 92 16:26:29 GMT Organization: ICE Engineering, Inc. In article <3625@caslon.cs.arizona.edu> (comp.sys.mac.programmer), jtgorman@cs.arizona.edu (J. Taggart Gorman) writes: > In article <1992Apr15.171630.7439@waikato.ac.nz>, > Citizen ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes : > >In article <258@farallonfarallon.com>, neal@farallon.com (Neal Trautman) writes: > >> I don't think any of the other standard > >> compression utilities, StuffIt, Compact Pro, etc. > >> offer decompression in Apple's Installer. > > > >I think they do. I recall installing something that used Apple's Installer > >and StuffIt compression, but I can't remember which application it was. > > > >It wasn't Canvas... :-} > > Just installed Word 5.0 (no flames, please) today. > > It uses Apple's installer to place Word on your hard drive. Thing is, it > first copies _Stuffit Classic_ files to the hard drive, then uses "Stuffit > Engine v1.3" (I think v1.3) to unstuff. The apple installer allows you to write an external code resource to provide any installation "function" you wish. It would not be a terribly difficult task to hook into the StuffIt engine with this. tim. tim endres - time@ice.com -or- uupsi!tbomb!time ICE Engineering, Inc. - Phone (313) 449 8288 - FAX (313) 449-9208 8840 Main Street, Whitmore Lake, MI 48189 USENET - a slow moving self parody... ph +++++++++++++++++++++++++++ From: Brent Schorsch Date: 18 Apr 92 02:30:11 GMT Organization: Occidental College, Los Angeles, CA. USA In article <258@farallonfarallon.com> neal@farallon.com (Neal Trautman) writes: >I need to compress some files to fit on a >single diskette. I also need to use Apple's >Installer to do auto-decompression and installation. > >The only product I have heard of is VISE. >I don't think any of the other standard >compression utilities, StuffIt, Compact Pro, etc. >offer decompression in Apple's Installer. > >Are there any others? Any recommendations? >-- >Neal Trautman >Timbuktu Lead Software Engineer >Farallon Computing, Inc. >neal@farallon.com > Stuffit has a 'action atom' for apple's installer. (If you don't know what this is, check the installer manual, action atoms are what you would used to do the decompression) Salient (Disk Doubler) has their own installer which does decompression. hope this helps - -Brent +++++++++++++++++++++++++++ From: jeff@wilder.com (Jeff Osborn) Organization: Wilder Systems/Trik Product Group Date: Thu, 16 Apr 1992 13:27:42 GMT In article <258@farallonfarallon.com> neal@farallon.com (Neal Trautman) writes: >I need to compress some files to fit on a >single diskette. I also need to use Apple's >Installer to do auto-decompression and installation. > >The only product I have heard of is VISE. >I don't think any of the other standard >compression utilities, StuffIt, Compact Pro, etc. >offer decompression in Apple's Installer. > >Are there any others? Any recommendations? One possibility you may want to consider is NetDistributor. NetDistributor creates "packages" which are basically smart, self-expanding archives. These can either be sent over a network for automatic unattended installation or they can be placed on a server, floppy etc where, when double-clicked, they install files in the package according to your instructions. Furthermore, packages can be compressed and we get slightly better compression than DiskDoubler and Compact Pro in most cases. Although we have concentrated primarily on the market for network-based software installation we are realizing more and more that we should be offering the smart package concept as well. The packages are MUCH easier to create than a similar set of instructions with Apple's Installer and with our new 2.0 version you have all the same branching and file/resource installation and deletion capabilities. Given that you're also doing this for Timbuktu, it would seem that a package which can also be installed across the network would be a double-win. This is true for any developer whose product is used in a networked environment. Throop Wilder (throop@wilder.com) +++++++++++++++++++++++++++ From: Jeremiah.Blatz@dartmouth.edu (Jeremiah Blatz) Date: 25 Apr 92 19:27:35 GMT Organization: Dartmouth College, Hanover, NH In article <258@farallonfarallon.com> neal@farallon.com (Neal Trautman) writes: >I need to compress some files to fit on a >single diskette. I also need to use Apple's >Installer to do auto-decompression and installation. > >The only product I have heard of is VISE. >I don't think any of the other standard >compression utilities, StuffIt, Compact Pro, etc. >offer decompression in Apple's Installer. I have no idea, but if you ask the folks at Deneba, they might tell you (Canvas 3.0 is compressed and uses the Apple Installer to decompress). Good Luck, Jeremiah --------------------------- From: valentin@midnight-blue.cis.pitt.edu Subject: Mac IIfx advice wanted Date: 18 Apr 92 00:10:47 GMT Hello, all. I have been given the task of developing/acquiring some mail software for the Macintosh. As part of this project, I'm supposed to acquire a decent Mac for development purposes. Two of the constraints on this system include 1) Must be able to develop System 6 and System 7 compatible applications. 2) Must have a reasonably long useful life. I had originally settled on a Mac IIfx, since it is the fastest mac that can run system 6 and system 7. However, it seems that Apple has discontinued this particular machine. Another department has a Mac II fx for sale here. So I have some questions and I'd like some advice. Is there any potential problems that would cause the IIfx to have a short useful lifespan? That is, will it continue to run current software for a reasonable amount of time? How difficult is it to develop System 6-compatible applications on a System 7 machine? Am I correct in the first place that the Quadra will *not* run system 6? Instead of going up to a Quadra, is it reasonable to go down to a IIci or IIsi? Any help in this matter is GREATLY appreciated. I will summarize and post to the net. Thanks, Shawn Hernan University of Pittsburgh valentin+@pitt.edu valentin@midnight-blue.cis.pitt.edu +++++++++++++++++++++++++++ From: Jeremiah.Blatz@dartmouth.edu (Jeremiah Blatz) Date: 25 Apr 92 18:57:49 GMT Organization: Dartmouth College, Hanover, NH If you want a blisteringly fast Mac that will run Sys. 6 and 7, you might look into a CI with a 68040 cache card such as a Radius Rocket. With this configuration, you can get a mac faster than a Quadra (33 MHz) plus the ability to run both Sys. 6 and 7 (the Quadras do require Sys. 7). Hope this helps, Jeremiah --------------------------- From: dsb@mbunix.mitre.org Subject: Is it possible to dim a list box item Date: 20 Apr 92 11:29:47 GMT Organization: The MITRE Corporation Is it possible to dim a list box item once the operator has clicked on the selection. Pointers to an example would be greatly appreciated. Thanks Scott - ------ Scott Blodgett The MITRE Corporation dsb@mbunix.mitre.org Test and Integration Burlington Road, M/S G220 Bedford, MA 01730 (617) 271 - 8740 "When I was your age I had to walk to the TV" +++++++++++++++++++++++++++ From: jpurlia@qualcomm.com (John Purlia) Date: 20 Apr 92 16:44:28 GMT Organization: Qualcomm Incorporated In article <1992Apr20.112947.28325@linus.mitre.org>, dsb@mbunix.mitre.org writes: > > Is it possible to dim a list box item once the operator has clicked on the > selection. Pointers > to an example would be greatly appreciated. Yes. However, you can't do this using the default LDEF supplied to you by the List Manager. All you have to do is write your own LDEF that draws cells and handles mouse clicks. There is a very good example of an LDEF that draws sicn's before a list item on the developer's CD. Good luck! .......................................................................... John Purlia : My brain; not my company's brain. My brain says... jpurlia@qualcomm.com : "Just about any movie could be made better AOL: <Jpurlia> : if one of the characters were a vampire." .......................................................................... +++++++++++++++++++++++++++ From: zobkiw@world.std.com (Joe Zobkiw) Organization: The World Public Access UNIX, Brookline, MA Date: Fri, 24 Apr 1992 20:31:00 GMT To disable some text (within your own LDEF) you should use (under 7.x) the TextMode(grayishTextOr) call. This will automatically draw "disabled" text for you in true gray if the machine is in color or in dithered gray if not. ... TextMode(grayishTextOr); // set up gray text mode DrawText(...); // draw some text TextMode(srcOr); // restore default value ... - -- - -- joe zobkiw Internet: zobkiw@world.std.com - -- AOL: AFL Zobkiw - -- mac.synthesis.MIDI.THINK C.OOP.asm CI$: 70712,515 - -- communications.networks.cool tunes... --------------------------- From: jerome@ee.fit.edu (Jerome Chan) Subject: Power Book Slow Mode Date: 21 Apr 92 16:25:30 GMT Organization: Florida Tech, CP/EE Dept. It seems that when the powerbook (model 140) slows down after a period of inactivity (keyboard/mouse) Is there a software workaround for this? What system calls should I use? - -- The Evil Tofu +++++++++++++++++++++++++++ From: jmunkki@hila.hut.fi (Juri Munkki) Date: 25 Apr 92 15:06:08 GMT Organization: Helsinki University of Technology, Finland In article <jerome.703873530@yacht> jerome@ee.fit.edu (Jerome Chan) writes: >It seems that when the powerbook (model 140) slows >down after a period of inactivity (keyboard/mouse) > >Is there a software workaround for this? > >What system calls should I use? It sometimes helps to have all the Inside Macintosh volumes at hand. Try reading the power manager chapter of Inside Macintosh VI. If you can't afford all those books, subscribe to Develop and find a CD-ROM drive so you can copy the material from the CD-ROM that comes with the magazine. There are several ways to keep the processor going at full steam. ____________________________________________________________________________ / Juri Munkki / Helsinki University of Technology / Wind / Project / / jmunkki@hut.fi / Computing Center Macintosh Support / Surf / Arashi / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +++++++++++++++++++++++++++ From: s442070@nexus.yorku.ca (Tomas Hansson) Organization: York University, Toronto, Canada Date: Sat, 25 Apr 1992 21:42:12 GMT In article <1992Apr25.150608.25434@nntp.hut.fi> jmunkki@hila.hut.fi (Juri Munkki) writes: >In article <jerome.703873530@yacht> jerome@ee.fit.edu (Jerome Chan) writes: >>It seems that when the powerbook (model 140) slows >>down after a period of inactivity (keyboard/mouse) >> >>Is there a software workaround for this? >> >>What system calls should I use? > >It sometimes helps to have all the Inside Macintosh volumes at hand. >Try reading the power manager chapter of Inside Macintosh VI. If you >can't afford all those books, subscribe to Develop and find a CD-ROM >drive so you can copy the material from the CD-ROM that comes with >the magazine. > >There are several ways to keep the processor going at full steam. And the easiest one is probably to read the manual and use the portable control panel... Acording to the manual, the rest mode is suppose to reset itself to "Rest" everytime you restart. I have found that this is not the case and the setting remains until the next time you change it! /Tomas s442070@nexus.yorku.ca --------------------------- Subject: "Low Memory" Situatiojn From: Christopher Tate <CXT105@psuvm.psu.edu> Date: Tuesday, 21 Apr 1992 14:39:43 EDT Organization: Penn State University In article <703876338.F00001@blkcat.UUCP>, Jeffrey.Licht@p4212.f70.n109.z1.fidonet.org (Jeffrey Licht) says: > > JH> Don't some people in memory low situations (e.g. 4 MB MacPlus and > JH> system 7) have > >You have a strange idea of a "low memory" situation. 4 megs on a toaster Mac s >is >quite enough for any kind of normal use. 2 megs, on the other hand... Qu'a tu?? (Loose translation: "What kind of space drugs are you on?" :-) I'd claim that it all depends on how you define "normal" use; I myself tend to call just about anything "normal," by the argument that if I want to do it, it's normal use. 2 megs on a toaster Mac isn't enough to run Excel 3.0, for example. Seems pretty normal to me. And that's not even stopping to contemplate MPW... - ------- Christopher Tate | Cryptogram #5: cxt105@psuvm.psu.edu | CXT105@PSUVM.BITNET | "BYNXMQC, QHVNXZ. QNRX TYZZNHO - ---------------------------------| EDSXO NO H ANXQV XHMNOW GLXXZX, Send me the answer; I love mail! | HOV HQQ MLHM." (WQXX GQYK) +++++++++++++++++++++++++++ From: ksand@apple.com (Kent Sandvik) Date: 24 Apr 92 01:22:00 GMT Organization: MacDTS Mongols In article <92112.143943CXT105@psuvm.psu.edu>, CXT105@psuvm.psu.edu (Christopher Tate) writes: > > In article <703876338.F00001@blkcat.UUCP>, > Jeffrey.Licht@p4212.f70.n109.z1.fidonet.org (Jeffrey Licht) says: > > > > JH> Don't some people in memory low situations (e.g. 4 MB MacPlus and > > JH> system 7) have > > > >You have a strange idea of a "low memory" situation. 4 megs on a toaster Mac s > >is > >quite enough for any kind of normal use. 2 megs, on the other hand... > > Qu'a tu?? > > (Loose translation: "What kind of space drugs are you on?" :-) > > I'd claim that it all depends on how you define "normal" use; I myself > tend to call just about anything "normal," by the argument that if I > want to do it, it's normal use. 2 megs on a toaster Mac isn't enough > to run Excel 3.0, for example. Seems pretty normal to me. And that's > not even stopping to contemplate MPW... Same opinion. A user friendly application should not just stop due to lack of memory, it should at least try to presenta a dialog box telling about the state. Grep through the Macapp sources for possible implementations of checking memory now and then. Cheers, Kent +++++++++++++++++++++++++++ From: Jeremiah.Blatz@dartmouth.edu (Jeremiah Blatz) Date: 25 Apr 92 20:06:12 GMT Organization: Dartmouth College, Hanover, NH Perhaps you should try working with 600 dpi bitmaps. Jeremiah --------------------------- Organization: Carnegie Mellon, Pittsburgh, PA Date: Wed, 22 Apr 1992 20:46:12 -0400 From: Alison Rebecca Colman <ac10+@andrew.cmu.edu> Subject: Creating interface -- help!!! Hello everybody, I am creating the icons and interface using ThinkC and ResEdit for a mechanical engineering project. I have already created the menu bar and what I need to do now is create the toolbox that is most often present on the left side of the screen in most programs. The literature I have (Inside Macintosh, volume 1) does not tell me how to do this, andI could not find anything in my school library,so the question I have is: does anyone out there know of any books that would give me the information I need, or have any code that would help me get started? Also, does anyone out there know where I would get information on how to make the "drag and drop" routine for the icons? Thank you all very much in advance! By the way, if my questioning is too vague, please let me know and I will answer all questions. Cheers, Alison +++++++++++++++++++++++++++ From: edw@caligula.cts.com (Ed Watkeys) Date: Thu, 23 Apr 92 09:09:35 EDT Organization: Guerrilla Networking Project In article <EdxUXIG00WBNA8StgW@andrew.cmu.edu> (comp.sys.mac.programmer), Alison Rebecca Colman <ac10+@andrew.cmu.edu> writes: > Hello everybody, > > Also, does anyone > out there know where I would get information on how to make the "drag > and drop" routine for the icons? > > Cheers, > Alison > If you're referring to dragging and dropping documents onto the Finder Icon for your application, then you want to make an FREF resource, which describes what types of files can be dropped onto your application. I don't know if this is the official use of an FREF is, but that's what it has done for me. - -- Ed Watkeys (Drexel U. Comp Sci) "Moral judgement and condemnation is edw@caligula.cts.com the favorite form of revenge for the edw%caligula@phlpa.pha.pa.us spiritually limited on those who are ls.com!phlpa!caligula!edw less so...." -- Friedrich Nietzsche +++++++++++++++++++++++++++ From: Jeremiah.Blatz@dartmouth.edu (Jeremiah Blatz) Date: 25 Apr 92 20:59:49 GMT Organization: Dartmouth College, Hanover, NH In article <EdxUXIG00WBNA8StgW@andrew.cmu.edu> ac10+@andrew.cmu.edu (Alison Rebecca Colman) writes: > I have already created the menu bar and > what I need to do now is create the toolbox that is most often present > on the left side of the screen in most programs. I think what you're refering to is the toolbox in programs like MacPaint and Canvas. If so, here goes. The document window is not really a window, but a dialog. (I know, it is in fact a window, but not from the standpoint of Jane Q. Programmer.) The toolbox is a bunch of active PICT resources. When the user clicks on one, you should use InvertRect (QuickDraw call) on the rect of the PICT. I suggest that you look at the resources of a program that uses this for more info. All of this is documented in Inside Mac vol. 1, although you have to look for it. If you want additional help, you can send me e-mail. hope this helps, Jeremiah JerBl@Dartmouth.edu --------------------------- From: skrans@pnet51.orb.mn.org (Steve Krans) Subject: mpw 3.2 c++/cfront 2.0 question Date: 23 Apr 92 02:45:10 GMT Organization: People-Net [pnet51], Minneapolis, MN. In the midst of learning c++, I came across an mpw oddity that works just fine on Borland's Turbo c++. I was wondering if anyone could offer an explanation of the following: with the code: - -------------- #include <stdio.h> #include <iostreams.h> int main() { int i=0; cout << "line1\n"; scanf("%d",i); cout << "line2\n"; scanf("%d",i); } - -------------- will first input the two integers, then output my line1 & line2 like: 12<cr> 13<cr> line1 line2 I've also had problems with: - -------------- #include <stdio.h> #include <iostreams.h> int main() { int i=0; cout << "\ninput:"; // cout << "\ninput:\n"; will work, however cin >> i; cout << i << "\n"; } - -------------- will always cout 0 for i. I'm using mpw 3.2 c++/cfront 2.0. thanks for any help. ___________________________ Steve Krans, Minneapolis MN INET: skrans@pnet51.orb.mn.org UUCP: {tcnet, crash, quest}!orbit!pnet51!skrans +++++++++++++++++++++++++++ From: trimper@edsi.plexus.COM (Greg Trimper) Date: 23 Apr 92 19:04:40 GMT Organization: Enterprise Data Systems Incorporated, Appleton WI skrans@pnet51.orb.mn.org (Steve Krans) writes: >with the code: >-------------- >#include <stdio.h> >#include <iostreams.h> First off, in MPW, this is <iostream.h> However, your exampls work fine when built as a SIOW app. I have had problems trying to use scanf in non-siow applications, but that is probably due to its non-mac functioning. Greg Trimper trimper@edsi.plexus.com +++++++++++++++++++++++++++ From: mlanett@void.ncsa.uiuc.edu (Mark Lanett) Date: 23 Apr 92 15:45:57 GMT Organization: University of Illinois at Urbana skrans@pnet51.orb.mn.org (Steve Krans) writes: >int >main() >{ > int i=0; > cout << "line1\n"; > scanf("%d",i); > cout << "line2\n"; > scanf("%d",i); >} >will first input the two integers, then output my line1 & line2 like: >12<cr> >13<cr> >line1 >line2 I think it's that cout is buffered. >int >main() >{ > int i=0; > cout << "\ninput:"; // cout << "\ninput:\n"; will work, however > cin >> i; > cout << i << "\n"; > } >will always cout 0 for i. MPW reuires input to be on it's own line. When you hit return (enter) it will send the entire line, including the prompt, to cin. Thus you cannot have any prompts without newlines. I don't know if SIOW changes this. - -- Mark Lanett, Software Tools Group, NCSA; mlanett@uiuc.edu; NCSA.STG (AppleLink) --------------------------- From: jcocon@hubcap.clemson.edu (james c oconnor) Subject: Think Reference Question (Experiences?) Organization: Clemson University Date: Thu, 23 Apr 1992 20:15:02 GMT I am thinking about getting Think Reference. Does anyone out there have it? How much HD space does it take up? How quick is it on your hardware? I have a ci, will I be chewing my nails wishing for the hardcopy version? How many volumes of IM does it cover? I am trying to decide between buying them all hardcopy or Think Reference, hard disk space being somewhat problematic at the moment tends to make hard copy look better. One last question, a while back I got an offer coupon from Think for a discounted price on Reference because I own Think C. I am pretty sure that it is lost - (someone from Think who reads the net might be able to help me out here) what are the current deals for Think customers? Jim - -- Democracy is two wolves and a sheep voting on what to have for lunch. +++++++++++++++++++++++++++ From: andrews@sp1.csrd.uiuc.edu (John Andrews) Organization: UIUC Center for Supercomputing Research and Development Date: Thu, 23 Apr 92 21:00:51 GMT jcocon@hubcap.clemson.edu (james c oconnor) writes: >I am thinking about getting Think Reference. Does anyone out there have >it? How much HD space does it take up? How quick is it on your >hardware? I have a ci, will I be chewing my nails wishing for the >hardcopy version? How many volumes of IM does it cover? I am trying to >decide between buying them all hardcopy or Think Reference, hard disk >space being somewhat problematic at the moment tends to make hard copy >look better. 1) Yes 2) 2.3 Meg 3) Very fast, even on a MacPlus 4) It is not a complete replacement for IM. I use both. The combination is more powerful than either one alone. 5) Covers IM I-V (does not cover VI). Leaves out some stuff from I-V. The only thing I miss is Sound Manager coverage. If you can only get one, I would get the hardcopy (skip Vol III, it is pretty worthless). MacZone has good prices on the set. Otherwise, get both. I have both, and it really saves me time. The only problem with getting Think Reference now is that it will probably be upgraded soon (this is only speculation on my part). The mail order price is $59 or $69. The upgrade price will probably be something like $49 (more speculation), which means that you will end up paying more than necessary. - -- John Andrews (andrews@csrd.uiuc.edu) "He who dies with the shortest .sig, wins" Graduate Research Assistant, Center for Supercomputing R&D, Urbana, IL +++++++++++++++++++++++++++ From: mwalker@wc.novell.com (Mel Walker) Organization: Novell, Inc. - Walnut Creek Date: Thu, 23 Apr 1992 22:39:54 GMT In article <1992Apr23.210051.23749@csrd.uiuc.edu> andrews@sp1.csrd.uiuc.edu (John Andrews) writes: >jcocon@hubcap.clemson.edu (james c oconnor) writes: > >>I am thinking about getting Think Reference. Does anyone out there have >>it? How much HD space does it take up? How quick is it on your >>hardware? I have a ci, will I be chewing my nails wishing for the >>hardcopy version? How many volumes of IM does it cover? I am trying to >>decide between buying them all hardcopy or Think Reference, hard disk >>space being somewhat problematic at the moment tends to make hard copy >>look better. > >1) Yes >2) 2.3 Meg >3) Very fast, even on a MacPlus >4) It is not a complete replacement for IM. I use both. The combination > is more powerful than either one alone. >5) Covers IM I-V (does not cover VI). Leaves out some stuff from I-V. The > only thing I miss is Sound Manager coverage. > >If you can only get one, I would get the hardcopy (skip Vol III, it is >pretty worthless). MacZone has good prices on the set. > >Otherwise, get both. I have both, and it really saves me time. > >The only problem with getting Think Reference now is that it will probably >be upgraded soon (this is only speculation on my part). The mail order >price is $59 or $69. The upgrade price will probably be something like >$49 (more speculation), which means that you will end up paying more than >necessary. > It also doesn't have appletalk. - --mel walker +++++++++++++++++++++++++++ From: cconstantine@galaxy.gov.bc.ca Date: 24 Apr 92 07:31:30 -0700 Organization: BC Systems Corporation In article <1992Apr23.201502.20152@hubcap.clemson.edu>, jcocon@hubcap.clemson.edu (james c oconnor) writes: > I am thinking about getting Think Reference. Does anyone out there have > it? How much HD space does it take up? How quick is it on your > hardware? I have a ci, will I be chewing my nails wishing for the > hardcopy version? How many volumes of IM does it cover? I am trying to > decide between buying them all hardcopy or Think Reference, hard disk > space being somewhat problematic at the moment tends to make hard copy > look better. Actually, I am running THINK Reference on a Mac Plus (until my LC II gets here) with 4Mb RAM and it's slick as a whistle. I enjoy it. It's very fast. The application itself is only 65K (I think, it's small at any rate) the Database on the other hand that it uses is over 2Mb!!! I think that it's a relatively small price to pay for a great product. It covers IM I-V (not VI yet) plus most of the TechNotes that have been out as well as some code samples and good descriptions of what routines do. It also covers the Gestalt Manager as well. All of the descriptions are in C but it supports Pascal copy & paste as well. Here's something, to the folks at Symantec, When will IM VI be out for THINK Reference???!!!!! and will it also contain the latest (April 92) TechNotes???!!! One more thing, a suggestion, you should be able to search on a specific TechNote if you like as well as some of the info being included for the procedure descriptions. For example, you should have another button in the window do index the TechNotes with their numbers and titles so that when reading a book that says "check out TechNote 120 - Off screen drawing" you can look at that _SPECIFICALLY_!!! - -- Carl.Constantine@BCSystems.gov.bc.ca Victoria, British Columbia, Canada --------------------------- From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) Subject: Something to smirk about Date: 24 Apr 92 12:22:02 +1200 Organization: University of Waikato, Hamilton, New Zealand I've been catching up on my reading of PC Magazine after an absence of several months, and I came across an interesting article about working with 24-bit colour images under Windows 3.0 in the September 10 issue. Charles Petzold created a 628 * 392 pixel 24-bit scan of his niece, and tried to display the result on a PS/2 Model 70 (20MHz 80386) with an 8514/A display (8 bits per pixel). It took 50 seconds to draw the image! I've done a bit of messing about with 24-bit images on the Mac myself, and I have *never* had to wait 50 seconds for one of that sort of size to display, not even on an 8-bit screen, and not even with QuickDraw's ditherCopy mode. And not even when my work machine was still a vintage Mac II with a 16MHz 68020 CPU. Moral: if you want to do colour work, you can forget Windows. Lawrence D'Oliveiro fone: +64-7-856-2889 Computer Services Dept fax: +64-7-838-4066 University of Waikato electric mail: ldo@waikato.ac.nz Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00 +++++++++++++++++++++++++++ From: shall@yoda.eecs.wsu.edu (Sean Hall - CS460) Date: 24 Apr 92 02:08:42 GMT Organization: Washington State University In article <1992Apr24.122202.7562@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes: >I've been catching up on my reading of PC Magazine after an absence of >several months, and I came across an interesting article about working >with 24-bit colour images under Windows 3.0 in the September 10 issue. > >Charles Petzold created a 628 * 392 pixel 24-bit scan of his niece, >and tried to display the result on a PS/2 Model 70 (20MHz 80386) >with an 8514/A display (8 bits per pixel). It took 50 seconds to >draw the image! > >I've done a bit of messing about with 24-bit images on the Mac myself, >and I have *never* had to wait 50 seconds for one of that sort of size >to display, not even on an 8-bit screen, and not even with QuickDraw's >ditherCopy mode. And not even when my work machine was still a vintage >Mac II with a 16MHz 68020 CPU. > >Moral: if you want to do colour work, you can forget Windows. Gosh, just think how fast an Amiga is... > >Lawrence D'Oliveiro fone: +64-7-856-2889 >Computer Services Dept fax: +64-7-838-4066 >University of Waikato electric mail: ldo@waikato.ac.nz >Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00 +++++++++++++++++++++++++++ From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) Date: 24 Apr 92 16:31:51 +1200 Organization: University of Waikato, Hamilton, New Zealand In article <1992Apr24.020842.27856@serval.net.wsu.edu>, shall@yoda.eecs.wsu.edu (Sean Hall - CS460) writes: >>Moral: if you want to do colour work, you can forget Windows. > Gosh, just think how fast an Amiga is... My mistake, I forgot to make it clear I was talking about *real* colour here... Lawrence +++++++++++++++++++++++++++ From: Jeremiah.Blatz@dartmouth.edu (Jeremiah Blatz) Date: 25 Apr 92 21:21:49 GMT Organization: Dartmouth College, Hanover, NH In article <1992Apr24.122202.7562@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes: > Charles Petzold created a 628 * 392 pixel 24-bit scan of his niece, > and tried to display the result on a PS/2 Model 70 (20MHz 80386) > with an 8514/A display (8 bits per pixel). It took 50 seconds to > draw the image! (ommited stuff about how much faster the Mac is) >Moral: if you want to do colour work, you can forget Windows. I've used Windows; actually, it's only slightly more annoying than command lines, and actually slower (on a color PS/2) than my Mac+. Moral: if you want to do anything, you can forget Windows. --------------------------- From: ghammond@metz.une.oz.au (Gerard Hammond) Subject: Determining the size of a file - SFGetfile Date: 24 Apr 92 00:26:13 GMT Could someone please explain how I can use the info from the standard open file procedure (SFGetFile) to determine the size of the selected file. Can it be done with the returned 'reply' variable? I only need to know the approximate size of the data fork ( as I'm going to put a progress bar as the operation on the file proceeds) Thanks in advance Gerard Hammond UNE, Armidale, Australia +++++++++++++++++++++++++++ From: michaelp@calvin.usc.edu (Michael Peterson) Date: 24 Apr 1992 13:13:45 -0700 Organization: University of Southern California, Los Angeles, CA In article <825@grivel.une.oz.au>, ghammond@metz.une.oz.au (Gerard Hammond) writes: |> Could someone please explain how I can use the info from the |> standard open file procedure (SFGetFile) to determine the size |> of the selected file. Can it be done with the returned 'reply' |> variable? I only need to know the approximate size of the data fork ( |> as I'm going to put a progress bar as the operation on the file proceeds) |> Thanks in advance |> Gerard Hammond |> UNE, Armidale, Australia I use the PBGetCatInfo call and: theSize = theCPB.hFileInfo.ioFlLgLen - theCPB.hFileInfe.ioFlStBlk; This will give you the data fork size. I think this is the same thing that 'Get Info' does, except that if also checks the resource size: theSize = theSize + theCPB.hFileInfo.ioFlRLgLen - theCPB.hFileInfo.ioFlRStBlk Anyway, hope this helps. Michael L. Peterson +++++++++++++++++++++++++++ From: keith@taligent.com (Keith Rollin) Date: 25 Apr 92 02:50:48 GMT Organization: Taligent In article <kvgqvpINNjia@calvin.usc.edu>, michaelp@calvin.usc.edu (Michael Peterson) writes: > > > In article <825@grivel.une.oz.au>, ghammond@metz.une.oz.au (Gerard Hammond) writes: > |> Could someone please explain how I can use the info from the > |> standard open file procedure (SFGetFile) to determine the size > |> of the selected file. Can it be done with the returned 'reply' > |> variable? I only need to know the approximate size of the data fork ( > |> as I'm going to put a progress bar as the operation on the file proceeds) > |> Thanks in advance > |> Gerard Hammond > |> UNE, Armidale, Australia > > I use the PBGetCatInfo call and: > > theSize = theCPB.hFileInfo.ioFlLgLen - theCPB.hFileInfe.ioFlStBlk; > > This will give you the data fork size. I think this is the same thing that > 'Get Info' does, except that if also checks the resource size: > > theSize = theSize + theCPB.hFileInfo.ioFlRLgLen - theCPB.hFileInfo.ioFlRStBlk > Aipp! Michael, if you're using this in an actual program, you'd better look at your results. Subtracting those two fields is like subtracting the Finder flags from the creator type; they're totally different things. All you need are the ioFlLgLen and ioFlRLgLen fields. - -- Keith Rollin Phantom Programmer Taligent, Inc. +++++++++++++++++++++++++++ From: michaelp@calvin.usc.edu (Michael Peterson) Date: 26 Apr 92 00:07:40 GMT Organization: University of Southern California, Los Angeles, CA |> > I use the PBGetCatInfo call and: |> > |> > theSize = theCPB.hFileInfo.ioFlLgLen - theCPB.hFileInfe.ioFlStBlk; |> > |> |> Aipp! Michael, if you're using this in an actual program, you'd better look at |> your results. Subtracting those two fields is like subtracting the Finder flags |> from the creator type; they're totally different things. |> |> All you need are the ioFlLgLen and ioFlRLgLen fields. |> |> -- |> Keith Rollin |> Phantom Programmer |> Taligent, Inc. |> It seems that you might be correct. The reason that I didn't notice the difference is the the ioFlStBlk is almost always zero. I've run this program on an entire 40 meg hard drive using these fields and gotten the same result as 'Get Info'. In fact the only files the only files i've ever had problems with was MPW Project files, and with that changes i still have problems with them. Michael Peterson USC - UCS - CST --------------------------- End of C.S.M.P. Digest **********************